package com.sheledon.flyCat.common.utils;

import java.beans.PropertyEditor;
import java.beans.PropertyEditorManager;

/**
 * @author sheledon
 */
public class ObjectUtils {
    public static Object convert(Class<?> targetType,String s){
        PropertyEditor editor = PropertyEditorManager.findEditor(targetType);
        editor.setAsText(s);
        return editor.getValue();
    }
}
